﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using BE;
using DA;
using Quadrem.ExceptionManagement;

namespace BL
{
    public class blItem
    {
        public static DataTable ObtenerMateriales(beItem oBE)
        {
            DataTable dt = null;
            try
            {
                dt = daItem.ObtenerMateriales (oBE);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
            }
            return dt;
        }

        public static DataTable ObtenerRepuestos(beItem oBE)
        {
            DataTable dt = null;
            try
            {
                dt = daItem.ObtenerRepuestos(oBE);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
            }
            return dt;
        }

        public Int32 Registrar(beItem oBE)
        {
            try
            {
                return daItem.Registrar(oBE);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
                return -1;
            }
        }

        public static Int32 Eliminar(beItem oBE)
        {
            try
            {
                return daItem.Eliminar(oBE);
            }
            catch (Exception ex)
            {
                BusinessLogicBase.Publish(ex);
                return -99;
            }
        }
    }
}
